﻿@model BBCodeViewModel
@{
    Layout = "_BBCodes.cshtml";
}
        
<fieldset>
    <legend>Create BB Code</legend>
    @using (Html.BeginForm())
    { 
        @Html.Partial("_BBCode")
    } 
</fieldset>
        
<table> 
    <tr>
        <th class="edit"></th>
        <th class="delete"></th>
        <th>Tag</th>
        <th>Parse</th>
    </tr>
            
    @foreach (var bbCode in Model.BBCodes)
    { 
        <tr>
            <td>@Html.ActionLink("Edit", "EditBBCode", new { BBCodeID = bbCode.BBCodeID })</td>
            <td>@Html.AdminConfirm("Delete", Url.Action("DeleteBBCode", new { BBCodeID = bbCode.BBCodeID }), Url.Action("BBCodes"))</td>
            <td>@bbCode.Tag</td>
            <td>@bbCode.Parse</td>
        </tr>
    }    
</table>